import 'package:flutter/material.dart';
import 'package:flutter_shopping/components/app_bar.dart';
import 'package:flutter_shopping/models/product.dart';
import 'package:flutter_shopping/pages/detail/components/detail_body.dart';

class ProductDetailPage extends StatelessWidget {
  final Product product;

  const ProductDetailPage({
    super.key,
    required this.product,
  });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: product.color,
      appBar: const ShoppingAppBar(
        haveLeading: true,
        backgroundColor: Colors.transparent,
        backColor: Colors.white,
        searchColor: Colors.white,
        cartColor: Colors.white,
      ),
      body: ProductDetailBody(product: product),
    );
  }
}
